<%--
  @desc: 应用系统角色新增
  @author: chenw
  @create: 2014-4-29 下午 15:32
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<style type="text/css">
    .pageFormContent .textInput { width: 220px; }
    .gray { color: gray; }
</style>
<div class="pageContent">
    <form id="pagerForm" method="post" action="<c:url value='/lucky/new'/>" class="pageForm required-validate"
          onsubmit="return validateCallback(this,callbackForSubmit)">
        <div class="pageFormContent">
            <p>
                <label for="txt_lucky_name" class="required">奖项名称</label>
                <input id="txt_lucky_name" type="text" name="name" class="required" maxlength="50"/>
            </p>
            <p>
                <label for="txt_lucky_num">数量</label>
                <input id="txt_lucky_num" type="text" name="num" class="required" maxlength="4" placeholder="请填入数字数量"/>
            </p>
            <p>
                <label for="txt_lucky_note">奖项排序</label>
                <input id="txt_lucky_note" type="text" name="note" maxlength="24"/>
            </p>
            <p>
                <label for="txt_lucky_votes">抽奖数量</label>
                <input id="txt_lucky_votes" type="text" name="votes" value="1"/>
            </p>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">保存</button>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" class="close">取消</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<script type="text/javascript">
    function callbackForSubmit(resp, st, xhr) {
        if (resp && resp.succ) {
            alertMsg.info("新增成功！");
            $.pdialog.closeCurrent();
            navTab.reloadFlag('page_os_lucky_index')
        } else {
            alertMsg.info(resp.msg + "!");
        }
    }
</script>